package com.mayi.zds.service;

import com.mayi.zds.entity.OrderStatusEntity;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * @ClassName ScanOrderStatusService
 * @Description TODO
 * @Author zhong
 * @Date 2019/12/26 0026 上午 11:28
 * @Version 1.0
 */
public interface ScanOrderStatusService {

    /**
     * 添加订单状态任务进入队列
     * @Author zhong
     * @Date 2019/12/26 11:30:54
     * @param orderStatusEntity
     **/
    public void addOrder(OrderStatusEntity orderStatusEntity);

    /**
     * 处理订单状态任务，符合要求就取消订单，并移除该任务
     * @Author zhong
     * @Date 2019/12/26 11:31:03
     **/
    public void checkAndHandle();

    /**
     * 取消任务，将任务的toCancleOrder设为fasle
     * @Author zhong
     * @Date 2019/12/26 11:57:54
     * @param orderId 订单ID
     * @return void
     **/
    public void cancleTask(String orderId);
}
